package com.youkeyi.ddy.cloud.common.api.basic.pub.organization;

import com.youkeyi.ddy.cloud.common.api.basic.pub.organization.dto.PublicOrganizationListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.organization.dto.PublicOrganizationTreeItemCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.organization.param.*;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * PublicOrganizationCloudServiceFallback
 *
 * @Author liuxiawang
 * @Date 2024/2/20 5:48 PM
 * @Location shenzhen.china
 */
@Slf4j
@Component
@RequestMapping("/public/organization/fallback")
public class PublicOrganizationCloudServiceFallback implements PublicOrganizationCloudService {

    @Override
    public PublicOrganizationListCloudDto query(PublicOrganizationQueryCloudParam param) {
        return new PublicOrganizationListCloudDto(Boolean.FALSE, "服务不可用");
    }

    @Override
    public List<PublicOrganizationTreeItemCloudDto> queryTree(PublicOrganizationQueryTreeCloudParam param) {
        log.error("服务不可用");
        return new ArrayList<>();
    }

    @Override
    public ResponseContent create(PublicOrganizationCreateCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent update(PublicOrganizationUpdateCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent delete(PublicOrganizationDeleteCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }
}
